package com.itany.corejava.day09;

public class TestInnerClass1 {


    public static void main(String[] args) {
        OuterA.InnerA innerA=new OuterA.InnerA();
        innerA.f();


        OuterA out=new OuterA();
        OuterA.InnerB innerB=out.new InnerB();
        innerB.f();



    }



}

class OuterA{

    private static int i=1;
    private int j=2;


    public static void f(){
        InnerA innerA=new InnerA();
        innerA.f();
    }

    //静态内部类
    public static class InnerA{

        public void f(){
            System.out.println(i);
//            System.out.println(j);
        }

    }

    //局部内部类
    public class InnerB{

        private int j=3;

        public void f(){
            System.out.println(OuterA.i);
            System.out.println(this.j);
            System.out.println(OuterA.this.j);
        }

    }

}